<#include "/common/defaultEngine.html"/>
<@pageTheme mark="${config.optimize()?string('true', 'false')}">
<@header title="修改过户" bodyClass="white-bg" libs=["prism","bootstrapSelect","ueditor"]/>
<div class="wrapper wrapper-content ibox-content">
    <@form.form id="form-transfer-edit"  class="form-horizontal">
    <input name="id" value="${bpmCrmTransfer.id}" type="hidden">
    <div class="form-group">
        <label class="col-sm-3 control-label"><span style="color: red; ">*</span><@ctx.i18n text = "销售员" />：                               <i class="fa fa-question-circle-o" title="销售员"></i>                                
       </label>
        <div class="col-sm-8"><input name="saleUserid" value="${bpmCrmTransfer.saleUserid?default("")}" class="form-control" type="text"  required>                                                
        </div>
     </div>
    <div class="form-group">
        <label class="col-sm-3 control-label"><span style="color: red; ">*</span><@ctx.i18n text = "销售订单编号" />：                               <i class="fa fa-question-circle-o" title="销售订单编号"></i>                                
       </label>
        <div class="col-sm-8"><input name="saleOrderNumber" value="${bpmCrmTransfer.saleOrderNumber?default("")}" class="form-control" type="text"  required>                                                
        </div>
     </div>
    <div class="form-group">
        <label class="col-sm-3 control-label"><span style="color: red; ">*</span><@ctx.i18n text = "车辆识别号" />：                               <i class="fa fa-question-circle-o" title="车辆识别号"></i>                                
       </label>
        <div class="col-sm-8"><input name="outCarVin" value="${bpmCrmTransfer.outCarVin?default("")}" class="form-control" type="text"  required>                                                
        </div>
     </div>
    <div class="form-group">
        <label class="col-sm-3 control-label"><span style="color: red; ">*</span><@ctx.i18n text = "车型" />：                               <i class="fa fa-question-circle-o" title="车型"></i>                                
       </label>
        <div class="col-sm-8"><input name="outCarVehicle" value="${bpmCrmTransfer.outCarVehicle?default("")}" class="form-control" type="text"  required>                                                
        </div>
     </div>
    <div class="form-group">
        <label class="col-sm-3 control-label"><span style="color: red; ">*</span><@ctx.i18n text = "特殊备注"/>：</label>
        <div class="col-sm-8">
            <textarea name="orderSpecialRemark" class="form-control" required>"${bpmCrmTransfer.orderSpecialRemark?default(")}</textarea>
        </div>
    </div>
               
    <div class="form-group">
        <label class="col-sm-3 control-label"><span style="color: red; ">*</span><@ctx.i18n text = "出纳审核"/>：</label>
        <div class="col-sm-8">
           <@form.radio name="orderCashierReview" dictType="sys_bpm_crm_passorclose" value="${bpmCrmTransfer.orderCashierReview?default('')}" />
        </div>

    </div>
    <div class="form-group">
        <label class="col-sm-3 control-label"><span style="color: red; ">*</span><@ctx.i18n text = "财务经理审核"/>：</label>
        <div class="col-sm-8">
           <@form.radio name="orderFinanceManagerReview" dictType="sys_bpm_crm_passorclose" value="${bpmCrmTransfer.orderFinanceManagerReview?default('')}" />
        </div>

    </div>
    <div class="form-group">
        <label class="col-sm-3 control-label"><span style="color: red; ">*</span><@ctx.i18n text = "客户ssn" />：                               <i class="fa fa-question-circle-o" title="客户ssn"></i>                                
       </label>
        <div class="col-sm-8"><input name="orderCustomerSsn" value="${bpmCrmTransfer.orderCustomerSsn?default("")}" class="form-control" type="text"  required>                                                
        </div>
     </div>
    <div class="form-group">
        <label class="col-sm-3 control-label"><span style="color: red; ">*</span><@ctx.i18n text = "客户I-20附件" />：                               <i class="fa fa-question-circle-o" title="客户I-20附件"></i>                                
       </label>
        <div class="col-sm-8"><input name="orderCustomerIFilepath" value="${bpmCrmTransfer.orderCustomerIFilepath?default("")}" class="form-control" type="text"  required>                                                
        </div>
     </div>
    <div class="form-group">
        <label class="col-sm-3 control-label"><span style="color: red; ">*</span><@ctx.i18n text = "注册人姓名" />：                               <i class="fa fa-question-circle-o" title="注册人姓名"></i>                                
       </label>
        <div class="col-sm-8"><input name="orderRegistrantName" value="${bpmCrmTransfer.orderRegistrantName?default("")}" class="form-control" type="text"  required>                                                
        </div>
     </div>
    <div class="form-group">
        <label class="col-sm-3 control-label"><span style="color: red; ">*</span><@ctx.i18n text = "注册人地址" />：                               <i class="fa fa-question-circle-o" title="注册人地址"></i>                                
       </label>
        <div class="col-sm-8"><input name="orderRegistrantAddress" value="${bpmCrmTransfer.orderRegistrantAddress?default("")}" class="form-control" type="text"  required>                                                
        </div>
     </div>
    <div class="form-group">
        <label class="col-sm-3 control-label"><span style="color: red; ">*</span><@ctx.i18n text = "注册人手机" />：                               <i class="fa fa-question-circle-o" title="注册人手机"></i>                                
       </label>
        <div class="col-sm-8"><input name="orderRegistrantPhone" value="${bpmCrmTransfer.orderRegistrantPhone?default("")}" class="form-control" type="text"  required>                                                
        </div>
     </div>
    <div class="form-group">
        <label class="col-sm-3 control-label"><span style="color: red; ">*</span><@ctx.i18n text = "是否需要邮件"/>：</label>
        <div class="col-sm-8">
           <@form.radio name="orderIsNeedMail" dictType="sys_crm_isOrNo" value="${bpmCrmTransfer.orderIsNeedMail?default('')}" />
        </div>

    </div>
    <div class="form-group">
        <label class="col-sm-3 control-label"><span style="color: red; ">*</span><@ctx.i18n text = "收件人是否同注册人"/>：</label>
        <div class="col-sm-8">
           <@form.radio name="orderRecipientisregistrant" dictType="sys_crm_isOrNo" value="${bpmCrmTransfer.orderRecipientisregistrant?default('')}" />
        </div>

    </div>
    <div class="form-group different">
        <label class="col-sm-3 control-label"><span style="color: red; ">*</span><@ctx.i18n text = "收件人姓名" />：
       </label>
        <div class="col-sm-8"><input name="orderRecipientName" value="${bpmCrmTransfer.orderRecipientName?default("")}" class="form-control" type="text" required>
        </div>
     </div>
    <div class="form-group different">
        <label class="col-sm-3 control-label"><span style="color: red; ">*</span><@ctx.i18n text = "收件人地址" />：
       </label>
        <div class="col-sm-8"><input name="orderRecipientAddress" value="${bpmCrmTransfer.orderRecipientAddress?default("")}" class="form-control" type="text" required>
        </div>
     </div>
    <div class="form-group different">
        <label class="col-sm-3 control-label"><span style="color: red; ">*</span><@ctx.i18n text = "收件人手机" />：
       </label>
        <div class="col-sm-8"><input name="orderRecipientPhone" value="${bpmCrmTransfer.orderRecipientPhone?default("")}" class="form-control" type="text" required>
        </div>
     </div>
    <div class="form-group different">
        <label class="col-sm-3 control-label"><span style="color: red; ">*</span><@ctx.i18n text = "邮件备注"/>：</label>
        <div class="col-sm-8">
            <textarea name="orderRecipientMailMemo" class="form-control" required>${bpmCrmTransfer.orderRecipientMailMemo?default("")}</textarea>
        </div>
    </div>
               
    <div class="form-group">
        <label class="col-sm-3 control-label"><span style="color: red; ">*</span><@ctx.i18n text = "税" />：                               <i class="fa fa-question-circle-o" title="税"></i>                                
       </label>
        <div class="col-sm-8"><input name="taxAmount" value="${bpmCrmTransfer.taxAmount?default("")}" class="form-control" type="text"  required>
        </div>
     </div>
    <div class="form-group">
        <label class="col-sm-3 control-label"><span style="color: red; ">*</span><@ctx.i18n text = "手续费" />：                               <i class="fa fa-question-circle-o" title="手续费"></i>                                
       </label>
        <div class="col-sm-8"><input name="taxServiceCharge" value="${bpmCrmTransfer.taxServiceCharge?default("")}" class="form-control" type="text"  required>                                                
        </div>
     </div>
    <div class="form-group">
        <label class="col-sm-3 control-label"><span style="color: red; ">*</span><@ctx.i18n text = "运费" />：                               <i class="fa fa-question-circle-o" title="运费"></i>                                
       </label>
        <div class="col-sm-8"><input name="taxFreight" value="${bpmCrmTransfer.taxFreight?default("")}" class="form-control" type="text"  required>                                                
        </div>
     </div>
    <div class="form-group">
        <label class="col-sm-3 control-label"><span style="color: red; ">*</span><@ctx.i18n text = "航运信息" />：                               <i class="fa fa-question-circle-o" title="航运信息"></i>                                
       </label>
        <div class="col-sm-8"><input name="taxShippingInfo" value="${bpmCrmTransfer.taxShippingInfo?default("")}" class="form-control" type="text"  required>                                                
        </div>
     </div>
    <div class="form-group">
        <label class="col-sm-3 control-label"><span style="color: red; ">*</span><@ctx.i18n text = "过户日期"/>：</label>
        <div class="col-sm-8">
            <div class="input-group date">
                <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
                <input class="form-control time-input" name="taxTransferDate"  data-type="date"   value="${(bpmCrmTransfer.taxTransferDate?string('yyyy-MM-dd'))!}" data-format="yyyy-MM-dd" type="text"  required/>
            </div>
        </div>
    </div>
    <div class="form-group">
        <label class="col-sm-3 control-label"><span style="color: red; ">*</span><@ctx.i18n text = "选择出库单" />：                               <i class="fa fa-question-circle-o" title="出库表主键id"></i>                                
       </label>
        <div class="col-sm-8"><input name="outboundPrimarkKey" value="${bpmCrmTransfer.outboundPrimarkKey?default("")}" class="form-control" type="text"  required>                                                
        </div>
     </div>
</@form.form>
<@footer>
<script type="text/javascript">
    $(function () {
        if($("[name='orderIsNeedMail']")[0].checked){
            $(".isNeedMail").show();
            if($("[name='orderRecipientisregistrant']")[0].checked){
                $(".different").hide();
            }
            else{
                $(".different").show();
            }
        }
        else{
            $(".isNeedMail").hide();
            $(".different").hide();
        }
    })
    var prefix = baseURL + "bpm/transfer";
    $("#form-transfer-edit").validate({
        focusCleanup: true
    });

    function submitHandler() {
        if (opt.validate.form()) {
            opt.operate.save(prefix + "/edit", $('#form-transfer-edit').serialize());
        }
    }
    /**
     * redio 单选回调
     * @param id
     * @param data
     * @param event
     */
    function  redioCallback(id,data,event){
        if(id == "orderIsNeedMail"){
            if ($(data).is(':checked')){
                var menuType = $(event.target).val();
                if(menuType=="1"){
                    $(".isNeedMail").show();
                    if($("[name='orderRecipientisregistrant']")[0].checked){
                        $(".different").hide();
                    }
                    else{
                        $(".different").show();
                    }
                }
                else{
                    $(".different").hide();
                    $(".isNeedMail").hide();
                }
            }
        }
        else if(id=="orderRecipientisregistrant"){
            if ($(data).is(':checked')){
                var menuType = $(event.target).val();
                if(menuType=="1"){
                    $(".different").hide();
                }
                else{
                    $(".different").show();
                }
            }
        }
    }
</script>
</@footer>
</@pageTheme>
